function getclean() {
	var APP_ID = 'c4w6bVvWfh8xxcmkBE1G0gIt-gzGzoHsz';
	var APP_KEY = 'JBikg4Ksk76zcTi5BKYWvTJF';
	AV.init({
		appId: APP_ID,
		appKey: APP_KEY
	});
}
getclean();

var newvue = new Vue({
	el: "body",
	data: {
		account: "",
		passwor: "",
		phone: "",
		mm: "",
		htm: "请填写手机号",
		isbb: false,
		iscc: false,
		isb: false,
		isc: false,
		ht: "字母开头,允许5-16字节,允许字母数字下划线。",
		colora: 'colora',
		show: false
	},
	methods: {
		verification: function() {
			var str = /^1[34578]\d{9}$/
			this.phone = str.test(this.account)
			if(str.test(this.account)) {
				this.htm = "此手机号可用"
				this.iscc = true
			} else {
				this.htm = "请输入正确的手机号"
				this.isbb = true
			}
		},
		verifications: function() {
			var strs = /^[a-zA-Z][a-zA-Z0-9_]{4,15}$/
			this.mm = strs.test(this.passwor)
			if(strs.test(this.passwor)) {
				this.ht = "密码可用"
				this.isc = true
			} else {
				this.ht = "请输入正确密码"
				this.isb = true
			}
		},

		reg: function() {
			if(this.mm && this.phone) {
				var user = new AV.User();
				user.setUsername(this.account);
				user.setPassword(this.passwor);
				user.signUp().then(function(loginedUser) {
					window.history.back()
				}, function(error) {
					newvue.show = true
					console.log(newvue.show)
					console.log(error)
				});
			}
		},
		sig: function() {
			location.href = "../Sign in/signin.html"
		},
		back: function() {
			window.history.back()
		},
		hide: function() {
			this.show = false
		}
	}
})